package com.org.common;

/**
 * @author lizhenzhong
 * @date 2018/9/6
 */
public class CommonEunm {
    /**
     * 是/否
     */
    public enum IsDefault{
        YES(1, "是"),
        NO(2, "否");

        private int id;
        private String name;
        IsDefault(int id, String name) {
            this.id = id;
            this.name = name;
        }
        public int getId() {
            return id;
        }
        public static String getName(int id) {
            for (IsDefault o : values()) {
                if (o.getId()== id) {
                    return o.name;
                }
            }
            return "";
        }
    }
}
